package Java实验.实验一;

public class Test1 {
    public static void main(String[] args){
        //1.
        System.out.println("hello Java world");
        //2.
//        int apple = 20;
//        int pear =40;
//        int sum = apple+pear;
//        System.out.println("20个苹果加40个梨有:"+sum+"个");
        //3.
//        System.out.println("输入两个数字:");
//        Scanner sc = new Scanner(System.in);
//        int num1 = sc.nextInt();
//        int num2 = sc.nextInt();
//        int num3=num1+num2;
//        System.out.println("两数之和为："+num3);
        //4.
//        System.out.println("输入一个年份:");
//        Scanner sc1 = new Scanner(System.in);
//        int year = sc1.nextInt();
//        if((year%4==0)&&(year%100!=0)||(year%4==0)){
//            System.out.println(year+"是闰年");
//        }else{
//            System.out.println(year+"不是闰年");
//       }
    }
}
